'use client';

import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
import { Button } from '@/components/ui/button';
import Link from 'next/link';
import { Bell, Newspaper } from 'lucide-react';

export function NoticesContent() {
  return (
    <div className="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
      <Card className="md:col-span-2">
        <CardHeader>
          <CardTitle className="flex items-center gap-2">
            <Bell className="h-5 w-5" />
            最新通知
          </CardTitle>
          <CardDescription>重要通知和公告</CardDescription>
        </CardHeader>
        <CardContent>
          <div className="space-y-4">
            <div className="grid gap-4 md:grid-cols-2">
              <div className="border-l-4 border-primary p-4 bg-muted rounded-lg">
                <div className="flex items-center gap-2 mb-2">
                  <Bell className="h-4 w-4 text-primary" />
                  <span className="font-medium">期中考试安排</span>
                </div>
                <p className="text-sm text-muted-foreground mb-2">
                  期中考试将于下周开始，请同学们做好准备。考试科目包括语文、数学、英语等主要科目。
                </p>
                <div className="flex justify-between items-center text-xs text-muted-foreground">
                  <span>三年级二班</span>
                  <span>2024-03-15</span>
                </div>
              </div>
              <div className="border-l-4 border-primary p-4 bg-muted rounded-lg">
                <div className="flex items-center gap-2 mb-2">
                  <Bell className="h-4 w-4 text-primary" />
                  <span className="font-medium">学校运动会通知</span>
                </div>
                <p className="text-sm text-muted-foreground mb-2">
                  春季运动会将于本月底举行，请各班做好准备工作，认真组织训练。
                </p>
                <div className="flex justify-between items-center text-xs text-muted-foreground">
                  <span>全校通知</span>
                  <span>2024-03-10</span>
                </div>
              </div>
            </div>
            <div className="flex gap-2">
              <Button asChild variant="outline" className="flex-1">
                <Link href="/parent/notices">班级通知</Link>
              </Button>
              <Button asChild variant="outline" className="flex-1">
                <Link href="/parent/school-notices">学校公告</Link>
              </Button>
            </div>
          </div>
        </CardContent>
      </Card>

      <Card>
        <CardHeader>
          <CardTitle className="flex items-center gap-2">
            <Newspaper className="h-5 w-5" />
            校园新闻
          </CardTitle>
          <CardDescription>学校近期新闻</CardDescription>
        </CardHeader>
        <CardContent>
          <div className="space-y-4">
            <div className="bg-muted rounded-lg overflow-hidden">
              <div className="aspect-video relative">
                <img
                  src="/placeholder.jpg"
                  alt="校园新闻图片"
                  className="object-cover w-full h-full"
                />
              </div>
              <div className="p-4">
                <h4 className="font-medium mb-1">我校在市科技展中获得佳绩</h4>
                <p className="text-sm text-muted-foreground">2024-03-16</p>
              </div>
            </div>
            <div className="space-y-3">
              <div className="flex items-center gap-3">
                <div className="w-2 h-2 rounded-full bg-primary"></div>
                <p className="text-sm">教师培训活动圆满结束</p>
              </div>
              <div className="flex items-center gap-3">
                <div className="w-2 h-2 rounded-full bg-primary"></div>
                <p className="text-sm">校园文化节筹备工作启动</p>
              </div>
              <div className="flex items-center gap-3">
                <div className="w-2 h-2 rounded-full bg-primary"></div>
                <p className="text-sm">我校举办读书节活动</p>
              </div>
            </div>
            <Button asChild variant="outline" className="w-full">
              <Link href="/parent/news">查看更多新闻</Link>
            </Button>
          </div>
        </CardContent>
      </Card>
    </div>
  );
} 